/*
 * FileName: StaffDailyDao.java
 *
 */
package com.mrc.ak.daily.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.mrc.ak.daily.model.DailyTypeDef;
import com.mrc.core.base.BaseDao;
import com.mrc.core.base.Constant;

/**
 * <p>
 * Description: 问题分类定义实体类
 * </p>
 *
 * @author Mrc
 * @version 4.1

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2016-12-22 上午10:18:25          Mrc        4.1         To create
 * </p>
 *
 * @since 
 * @see     
 */
@Repository
public class DailyTypeDefDao extends BaseDao<DailyTypeDef> {

    /**
     * @param entityClass
     */
    protected DailyTypeDefDao() {
        super(DailyTypeDef.class);
    }

    /**
     * 查询
     * @param status
     * @return
     */
    public List<DailyTypeDef> queryList(Integer status) {
        String hql = " from DailyTypeDef t where 1=1 ";
        if (status != null && (status == Constant.STATUS_IRREGULAR || status == Constant.STATUS_NORMAL))
            hql += " and t.status=" + status;
        return super.queryHQL(hql);
    }

}
